/PROG  PNS0010
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "V214/2901/3001";
PROG_SIZE	= 3198;
CREATE		= DATE 22-09-22  TIME 10:44:12;
MODIFIED	= DATE 25-05-10  TIME 15:53:56;
FILE_NAME	= PNS0077;
VERSION		= 0;
LINE_COUNT	= 112;
MEMORY_SIZE	= 3702;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: RL1 ;
   6:  !  PROGRAM: PNS0077 ;
   7:  !  PART:6373101/3201  ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14]=90    ;
  13:  R[18]=1    ;
  14:  R[19]=.3    ;
  15:  R[35]=TIMER[4]    ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  CALL ARM_CHECK    ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  27:   ;
  28:  R[1]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5] ;
  34:   ;
  35:  TIMER[2]=STOP ;
  36:  R[1]=R[1]+1    ;
  37:  R[2]=TIMER[2]    ;
  38:  R[3]=60/R[2]    ;
  39:  TIMER[2]=RESET ;
  40:  TIMER[2]=START ;
  41:   ;
  42:  !PROCEED TO PICK ;
  43:  LBL[20] ;
  44:  IF DI[1]=ON AND DI[8]=ON,JMP LBL[25] ;
  45:  IF DI[29]=ON,JMP LBL[90] ;
  46:  JMP LBL[20] ;
  47:   ;
  48:  LBL[25] ;
  49:  OVERRIDE=R[5] ;
  50:J P[3:PICK APPROACH] 100% CNT70 ACC100    ;
  51:  DO[1]=OFF ;
  52:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  53:  PAYLOAD[2] ;
  54:  CALL CHK_PICK    ;
  55:   ;
  56:J P[5:PICK DEPART] 100% CNT100 ACC100    ;
  57:  MONITOR Z_CHECH ;
  58:J P[7:PICK CLEAR] 100% CNT100 ACC100 DB  500.0mm,CALL END_PICK    ;
  59:  DO[1]=ON ;
  60:  DO[8]=PULSE,0.5sec ;
  61:  LBL[30:GOTO DROP POUNCE] ;
  62:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  63:  CALL CHECK_PICK    ;
  64:   ;
  65:  LBL[40:AT DROP POUNCE] ;
  66:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  67:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  68:  IF DI[18]=ON,JMP LBL[60] ;
  69:  JMP LBL[40] ;
  70:   ;
  71:  LBL[50:MOVE DROP SNEAK] ;
  72:  OVERRIDE=R[5] ;
  73:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  74:  LBL[51:DROP OR C-P-S] ;
  75:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  76:  IF DI[18]=ON,JMP LBL[40] ;
  77:  JMP LBL[51] ;
  78:  JMP LBL[50] ;
  79:   ;
  80:  LBL[60:MOVE CLS-PRS-ACC] ;
  81:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  82:  PAUSE ;
  83:  JMP LBL[30] ;
  84:   ;
  85:  LBL[80:DROP ENABLED] ;
  86:  !PROCEED TO DROP ;
  87:  TIMER[4]=RESET ;
  88:  TIMER[4]=START ;
  89:   ;
  90:  DO[4]=OFF ;
  91:  OVERRIDE=R[5] ;
  92:J P[10:DROP APPROACH] 100% CNT30 ACC100    ;
  93:  MONITOR END Z_CHECH ;
  94:  DO[6]=PULSE,1.0sec ;
  95:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
  96:  PAYLOAD[1] ;
  97:  CALL CHK_DROP    ;
  98:J P[12:DROP DEPART] 100% CNT100 ACC100 TA   0.00sec,DO[7]=PULSE,1.0sec    ;
  99:  TIMER[4]=STOP ;
 100:J P[13:DROP CLEAR] 100% CNT100 ACC100    ;
 101:  !GOTO PICK POUNCE ;
 102:J P[2:PICK POUNCE] 100% CNT100 ACC100    ;
 103:  IF DI[29]=ON,JMP LBL[90] ;
 104:  JMP LBL[10] ;
 105:   ;
 106:  LBL[90:END OF CYCLE] ;
 107:  TIMER[1]=STOP ;
 108:  R[4]=TIMER[1]    ;
 109:J P[1:MIDDLE] 50% CNT100    ;
 110:  MOVE TO HOME    ;
 111:   ;
 112:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2642.493  mm,	Y =  -503.314  mm,	Z =  -886.412  mm,
	W =   179.994 deg,	P =      .009 deg,	R =   -89.999 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2641.770  mm,	Y =   171.090  mm,	Z =  -905.930  mm,
	W =   179.990 deg,	P =      .005 deg,	R =   -90.001 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2772.764  mm,	Y =   545.796  mm,	Z =  -935.549  mm,
	W =  -179.680 deg,	P =      .942 deg,	R =   -86.695 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2772.773  mm,	Y =   545.698  mm,	Z = -1073.460  mm,
	W =  -179.682 deg,	P =      .942 deg,	R =   -86.697 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2772.764  mm,	Y =   545.796  mm,	Z =  -935.549  mm,
	W =  -179.680 deg,	P =      .942 deg,	R =   -86.695 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3030.825  mm,	Y =  -712.055  mm,	Z =  -902.056  mm,
	W =  -179.727 deg,	P =      .944 deg,	R =   -90.072 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3000.305  mm,	Y = -1052.622  mm,	Z =  -837.276  mm,
	W =  -179.705 deg,	P =      .784 deg,	R =   -90.105 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2765.508  mm,	Y = -1947.585  mm,	Z =  -891.566  mm,
	W =  -179.751 deg,	P =      .545 deg,	R =   -90.179 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2631.702  mm,	Y = -3381.958  mm,	Z =  -879.796  mm,
	W =  -179.370 deg,	P =      .830 deg,	R =   -88.304 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2631.702  mm,	Y = -3381.958  mm,	Z =  -968.358  mm,
	W =  -179.370 deg,	P =      .830 deg,	R =   -88.304 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2631.702  mm,	Y = -3381.958  mm,	Z =  -901.397  mm,
	W =  -179.370 deg,	P =      .830 deg,	R =   -88.304 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2835.491  mm,	Y = -1187.512  mm,	Z =  -900.832  mm,
	W =   179.776 deg,	P =      .060 deg,	R =   -89.919 deg
};
/END
